package com.md.model.request.authentication.role;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.md.util.StringUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author 刘骄阳
 * 2023-01-06 16:16
 */
@Data
@ApiModel("角色与权限绑定请求实体")
@Builder
@AllArgsConstructor
public class BindRoleApiRequest {
  @NotNull(message = "角色id不能为空")
  @ApiModelProperty("角色id")
  @JsonFormat(shape = JsonFormat.Shape.STRING)
  private Long roleId;

  @ApiModelProperty("权限api列表")
  private List<Long> apiList;

  @Override
  public String toString() {
    return StringUtil.objectToJson(this);
  }
}
